package com.knowledge.plus.创建线程and线程池.注解创建线程.service.impl;

import com.knowledge.plus.创建线程and线程池.注解创建线程.service.IExecuteService;
import org.springframework.stereotype.Service;

/**
 * @author TPF
 * @since 2022/9/29
 */
@Service
public class IExecuteServiceImpl implements IExecuteService {

    @Override
    public void sleepingTest() {
        try {
            Thread.sleep(3000);
            System.out.println("execute1: 当前线程 id = " + Thread.currentThread().getId() + "；name = " + Thread.currentThread().getName());
        } catch (Exception e) {
            System.out.println(e);
        }
    }
}
